<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">@import url(Calendar-win2k-1.css);</style>
<script type="text/javascript" src="Calendar.js"></script>
<script type="text/javascript" src="Calendar-es.js"></script>
<script type="text/javascript" src="Calendar-setup.js"></script>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Fulbito Jueliz</title>
<style type="text/css">
body {
	background-image: url(Proxy_Grass.jpg);
}
</style>
</head>

<body>
<script>
function Validar()
{

	Fecha=AlquilerCancha.txtDia.value;

		var acumula="";


   	if(Fecha==""){acumula+="Registre una Fecha del Alquiler \n";}

	 	if(acumula!="")
	 	{ 
			 alert(acumula); 
		}
	 	else
	 		{
//	 			document.frmLocal.action="<%=request.getContextPath()%>/ServletRegistrarLocal";
//	 			document.frmLocal.method="Post";
//	 			document.frmLocal.accion.Value="GRABAR";
//	 			document.frmLocal.submit();
		location.href='Principal.jsp';
	 		}
}

function ValidaLetras()
{
	txt = window.event.keyCode;
	if(txt!=32 &&  txt<65 || window.event.keyCode>90 && window.event.keyCode<97 || window.event.keyCode>122)
	{
		window.event.keyCode=0;
		}
	}
	function ValidaNumeros(){
	if(window.event.keyCode<48 || window.event.keyCode>57){
	window.event.keyCode=0;}
	}
	function Principal(){
			location.href='Principal.jsp';
			}
</script>
<form id="AlquilerCancha" name="AlquilerCancha" method="post" action="">
  <table width="883" border="1">
    <tr>
      <td colspan="3" align="center" bgcolor="#FF9933"><h1><marquee Behavior= "alternate" scrollamount=7 >Alquiler de Canchas de Futbol</marquee></h1></td>
    </tr>
    <tr>
      <td colspan="3" bgcolor="#FF9933">&nbsp;</td>
    </tr>
    <tr>
      <td width="304" align="center" bgcolor="#FF9933">Nombre de la Cancha de Futbol</td>
      <td colspan="2" bgcolor="#FF9933"><label for="txtNombreCancha"></label>
      
      <%@page import="anonymus.negocio.CanchaNegocio,anonymus.modelo.Cancha,java.util.*" %>


	<select name="cboNombreLocal">
    
    <%
    CanchaNegocio neg = new CanchaNegocio();
	ArrayList Cancha = (ArrayList)neg.obtener();
	for(int i=0; i<Cancha.size();i++)
	{
    	Cancha entCancha=(Cancha)Cancha.get(i);
    %>
            <option value="<%=entCancha.getCodCancha()%>" selected> <%= entCancha.getNombreCancha() %></option>
            <%
            }
            %>
	</select>
				</td>
    </tr>
    <tr>
      <td align="center" bgcolor="#FF9933">Fecha de Alquiler</td>
      <td colspan="2" bgcolor="#FF9933"><input type="text"  readonly="readonly" id="txtDia" name="txtDia"> <input type="button" id="trigger" value="..."></td>
    </tr>
    <tr>
      <td align="center" bgcolor="#FF9933">Hora de Alquiler</td>
      <td colspan="2" bgcolor="#FF9933"><select name="cboHora">
      <option>00</option> <option>01</option> <option>02</option> <option>03</option> <option>04</option> <option>05</option>
      <option>06</option> <option>07</option> <option>08</option> <option>09</option> <option>10</option> <option>11</option>
      <option>12</option> <option>13</option> <option>14</option> <option>15</option> <option>16</option> <option>17</option>
      <option>18</option> <option>19</option> <option>20</option> <option>21</option> <option>22</option> <option>23</option>
      </select> Horas   
      <select name="cboMinutos">
      <option>00</option> <option>01</option> <option>02</option> <option>03</option> <option>04</option> <option>05</option>
      <option>06</option> <option>07</option> <option>08</option> <option>09</option> <option>10</option> <option>11</option>
      <option>12</option> <option>13</option> <option>14</option> <option>15</option> <option>16</option> <option>17</option>
      <option>18</option> <option>19</option> <option>20</option> <option>21</option> <option>22</option> <option>23</option>
      <option>24</option> <option>25</option> <option>26</option> <option>27</option> <option>28</option> <option>29</option>
      <option>30</option> <option>31</option> <option>32</option> <option>33</option> <option>34</option> <option>35</option>
      <option>36</option> <option>37</option> <option>38</option> <option>39</option> <option>40</option> <option>41</option>
      <option>42</option> <option>43</option> <option>44</option> <option>45</option> <option>46</option> <option>47</option>
      <option>48</option> <option>49</option> <option>50</option> <option>51</option> <option>52</option> <option>53</option>
      <option>54</option> <option>55</option> <option>56</option> <option>57</option> <option>58</option> <option>59</option>
      </select> Minutos</td>
    </tr>
    <tr>
      <td align="center" bgcolor="#FF9933">Servicio Adicional</td>
      <td colspan="2" bgcolor="#FF9933"><p>
        <label>
          <input type="checkbox" name="chkServicios" value="0" id="chkServicios_0" />
          Camisetas</label>
        <br />
        <label>
          <input type="checkbox" name="chkServicios" value="1" id="chkServicios_1" />
          Arbitros</label>
        <br />
        <label>
          <input type="checkbox" name="chkServicios" value="2" id="chkServicios_2" />
          Servicio de Fotografia</label>
        <br />
        <label>
          <input type="checkbox" name="chkServicios" value="3" id="chkServicios_3" />
          Servicio Medico</label>
        <br />
        <label>
          <input type="checkbox" name="chkServicios" value="4" id="chkServicios_4" />
          Servicio de Cafeteria</label>
        <br />
      </p></td>
    </tr>
    <tr>
      <td bgcolor="#FF9933">&nbsp;</td>
      <td colspan="2" bgcolor="#FF9933">&nbsp;</td>
    </tr>
    <tr>
      <td align="center" bgcolor="#FF9933"><input type="button" name="btnAceptar" id="btnAceptar" value="Aceptar" onclick="Validar()" style="font-weight: bold; color: white; background-color: green"/></td>
      <td width="182" bgcolor="#FF9933">&nbsp;</td>
      <td width="375" align="center" bgcolor="#FF9933"><input type="button" name="btnCancelar" id="btnCancelar" value="Cancelar" onclick="Principal()" style="font-weight: bold; color: white; background-color: green"/></td>
    </tr>
  </table>
</form>
<script type="text/javascript"> 
  function dateChanged(calendar) {
    if (calendar.dateClicked) {
      var y = calendar.date.getFullYear();
      var m = calendar.date.getMonth();
      var d = calendar.date.getDate();
      window.location = "AlquilerCanchasServlet";
    }
  };

  Calendar.setup(
    {
      inputField  : "txtDia",
      ifFormat    : "%Y-%m-%d",
      button      : "trigger"
    }
  );
  
 </script>

</body>
</html>
